home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / edit / sted102a.zip / SUPERTED.DOC < prev    next >
Text File  |  1994-06-08  |  14KB  |  339 lines

  1.             S U P E R T E D v1.02a
  2.             =====================
  3.  
  4. This is version 1.02a of Superted, and contains the following bug 
  5. fixes/enhancements:
  6.  
  7. BUG FIXES
  8.  
  9. 1. In word wrap mode, deleting an end of line which is followed by another end 
  10. of line now works properly.
  11.  
  12. 2. In word wrap mode, word wrap on insertion/deletion no longer causes the 
  13. occasional shift of the text down by one line.
  14.  
  15. 3. In word wrap mode, the bug which stopped the last line of a paragraph from 
  16. being wrapped when the paragraph is reformated, has been removed. 
  17.  
  18. ENHANCEMENTS
  19.  
  20. 1. It is now possible to configure the word wrap column (see configuration 
  21. section below)
  22.  
  23. Note: SEVERAL CONFIGURATION ADDRESSES HAVE BEEN CHANGED FROM VERSION 1.01.
  24. ---------------------------------------------------------------------------
  25.  
  26. Changes from version 1.00 to version 1.01
  27.  
  28. BUG FIXES
  29.  
  30. 1. Correctly deletes end of line in non-word wrap mode.
  31.  
  32. 2. Unpredictable crash on word wrap no longer occurs
  33.  
  34. 3. Handling of marked text on word wrap/line join corected.
  35.  
  36. ENHANCEMENTS
  37.  
  38. 1. Search and replace added (ALT-l)
  39.  
  40. 2. Save without exit (Shift F7)
  41.  
  42.  
  43. BACKGROUND
  44.  
  45. Programs like VIEW, SNEWS, PCelm, etc. all do a useful job. However,  each 
  46. comes with the throwaway line "use your favourite text editor"", or something 
  47. similar.  This is fine if you have a text editor that meets all your 
  48. requirements. However, what if you don't?
  49.  
  50. Text editors for use with mailers need to process text. They don't have to be 
  51. as sophisticated as a fully featured word processor, but ideally, they should 
  52. perform word wrap, enable the import of already  written text, and support 
  53. common conventions, such as readily enabling other articles, or EMail to be 
  54. quoted - and not just the one that you are responding to.
  55.  
  56. Demon supply copies of PC Magazine's Tiny Editor (TED) to help get new users 
  57. going. This is a nice fast editor, but it is really a programmer's editor, and 
  58. built to handle ".BAT" files, and the like. Other readily  available editors 
  59. like MSDOS Edit are very similar in what they can achieve.
  60.  
  61. At the other extreme, a true word processor, like MS Word, is just too 
  62. heavyweight for the job - and what you see is not always what you get, when 
  63. saving to a straight text format.
  64.  
  65. I spent much time looking around the Internet for a suitable editor for use 
  66. with the DIS suplied software. In the end, I didn't find what I wanted. 
  67. However, I did find something interesting. On SIMTEL20 is a modified version of 
  68. TED, called TEDPLUS. This is a hack of the TED code to add a search facility, 
  69. and such interesting features as single keystroke abort (hands up all those how 
  70. have never hit F1 by mistake) and an odd choice of colours. However, it also 
  71. comes with the source code. 
  72.   
  73. The code with TEDPLUS was the original TED code plus modifications. The 
  74. temptation was there to use it as the basis for developing the editor that I 
  75. wanted,  and that is what I have done. The result is SuperTED, which I have 
  76. made available to other users of DIS, as my way of saying thank you for all the 
  77. work put into the DIS software by other DIS members. I hope that you'll find it 
  78. useful.
  79.  
  80. SuperTED is the original TED plus the following features:
  81.  
  82. * Word Wrap on text entry
  83.  
  84. * Import of text from a  file
  85.  
  86. * Import and Paste with quote character at start of line
  87.  
  88. * Configurable Colours and quote character
  89.  
  90. * Search for specified Text
  91.  
  92. * Reformat of text (word wrap existing text)
  93.  
  94. * Print of whole file when no text selected
  95.  
  96. * Help Screen
  97.  
  98. * Improved Error Messages.
  99.  
  100. In the process, much of TEDplus has gone - I even rewrote the search algorithm 
  101. - so SuperTED is very much enhanced TED 1.0, and not enhanced TEDplus. No 
  102. unecessary control-Z, and I even fixed the original TED bug that displayed the 
  103. diamond a column too early.
  104.  
  105. You don't get something for nothing, and SuperTED is now over 6KB,
  106. compared with the original TED's 2.9KB. However, it seems to be just as fast as 
  107. before, even on my almost pensioned off 1640 PC-MD.
  108.  
  109. SuperTED is supplied in two versions. "ted.com" is the standard version, and 
  110. looks just like the old TED, except that F1 is now a help function. The escape 
  111. key is now the abort key. This version does not perform word wrap on start 
  112. up. This has to be explicitly toggled on and off using ALT-W.
  113.  
  114. The other version is "ted4mail.com" which is a conditional compilation that 
  115. has word wrap on by default, and does not prompt to confirm the filename on 
  116. exit. This version is the one expected to be used with mailers, when word wrap 
  117. is almost always required (ALT-W still works, if you want to turn it off) and 
  118. confirming the file name just gets in the way.
  119.  
  120.                 DISCLAIMER
  121.  
  122. SUPERTED IS NOT WARRANTEED AS FIT FOR ANY PURPOSE WHATSOEVER. IT IS USED AT THE 
  123. SOLE RISK OF THE USER, WHO IS CAUTIONED THAT THIS PROGRAM HAS NOT BEEN TESTED 
  124. TO A DEGREE SUFFICIENT FOR IT TO BE USED TO MAINTAIN, MODIFY OR BE IN CONTACT  
  125. WITH CRITICAL DATA. USERS THAT WISH TO USE IT IN SUCH SITUATIONS MUST CARRY OUT 
  126. THEIR OWN TESTING PROCEDURES IN ORDER TO DETERMINE THE SOFTWARE'S FITNESS FOR 
  127. PURPOSE.
  128.  
  129. That said, I have conducted limited testing on a 486 colour machine and 8086 
  130. B&W, and the basic functionality appears to work. I am actively using it for 
  131. my own purposes (like writing this document). I shall treat any reports of bugs 
  132. with sympathy and might even fix them.
  133.  
  134. WORD WRAP 
  135. =========
  136.  
  137. The word wrap algorithm is simple enough. Whenever a new character is entered, 
  138. the length of the displayable line (including TABS) is checked. If it is longer 
  139. than the screen width (determined at start up), then the start of the last word 
  140. on the screen is found, and a CR/LF inserted before it. If the line is indented 
  141. then the indent is copied and inserted after the new CR/LF thus preserving the 
  142. current indent.  The join algorithm is then called to join the wrapped around 
  143. text to the next line.
  144.  
  145. JOIN
  146. ====
  147.  
  148. The join algorithm is called either explicitly (by ALT-J) or implicitly at the 
  149. end of the word wrap algorithm. JOIN finds the end of the current line and 
  150. deletes the CR/LF at the end of the line unless an End of File or End of 
  151. paragraph (a line of white space) is found. Any white space (TABS and spaces) 
  152. around the end of line marker is also deleted. A single space is then inserted 
  153. at the point of deletion. If word wrap is enabled, then the word wrap algorithm 
  154. is invoked if the newly joined line is  wider than the screen width.  Word wrap 
  155. will flow round until the current paragraph is correctly formatted.
  156.  
  157. Note that DEL with the cursor at end of line is equivalent to ALT-J.
  158.  
  159. REFORMAT
  160. ========
  161.  
  162. There are situations where the above will not format a paragraph correctly - 
  163. typically when the next line is a short line followed by a line wider than the 
  164. screen width. Also character insertion is the only way to force word wrap. In 
  165. such situations, REFORMAT is useful as a means of forcing proper format on text 
  166. without having to enter text or individually join lines.
  167.  
  168. Reformat (ALT-R) is simply a repetitive call to JOIN from the current cursor 
  169. position through to the end of the current paragraph (or end of file). This 
  170. forces reformatting of the remainder of the current paragraph.
  171.  
  172. If text is currently selected then Reformat applies to the whole of the current 
  173. selection.
  174.  
  175. IMPORT
  176. ======
  177.  
  178. F12 (or ALT-I) calls file import. The user is prompted for a filename, and the 
  179. file's contents is read into the paste buffer and then automatically pasted 
  180. into the current cursor location. The same text may be repasted using F6.
  181.  
  182. Note that all prompts for text entry have the same conventions now. Escape 
  183. aborts entry, DEL erases the currently displayed text, and ENTER completes text 
  184. entry. The previously entered text for the same prompt is always redisplayed at 
  185. the next call.
  186.  
  187. Import with quote character ('>') at the start of each line is identical to the 
  188. above, except that it is invoked by Shift F12 (or ALT-SHIFT-I).
  189.  
  190. The current contents of the paste buffer may also be pasted with the quote 
  191. character by Shift F6.
  192.  
  193. SEARCH
  194. ======
  195.  
  196. Search is invoked by F11 (or ALT-F). The user is prompted for a character 
  197. string and the file is searched for a (case blind) match until end of file is 
  198. reached. The found text, if any, is highlighted and the cursor positioned at 
  199. the start of the text. Note that the end of line marker is ignored by the 
  200. search algorithm, and hence searched for text may straddle a line boundary 
  201. (e.g. a hyphenated word broken at the hyphen by the word wrap algorithm).
  202.  
  203. A search may be repeated by Shift F11 (or ALT-SHIFT-F).
  204.  
  205. REPLACE
  206. =======
  207.  
  208. Replace is invoked by ALT-L. The user is prompted for a character 
  209. string and the file is searched for a (case blind) match until end of file is 
  210. reached. The found text, if any, is highlighted and the cursor positioned at 
  211. the start of the text. The user is then prompted for replacement text.
  212.  
  213. Repeat search and replace is invoked bu Shift ALT-L.
  214.  
  215. PRINT
  216. =====
  217.  
  218. Print (F3) with no text selected causes the whole file to be printed with a 
  219. Form Feed at End of File. As hitting F3 by mistake can be expensive, the user 
  220. is invited to confirm this operation.
  221.  
  222. CONFIGURATION
  223. =============
  224.  
  225. Permanent reconfiguration of SuperTED is performed using the built-in DOS 
  226. configuration utility, invoked by typing:
  227.  
  228. DEBUG ted.com
  229.  
  230. or
  231.  
  232. DEBUG ted4mail.com
  233.  
  234. at the command line prompt. The first variation is used to configure the 
  235. standard version of superTED, while the second is used to configure the mail 
  236. version. The Superted program files must be in the current directory.
  237.  
  238. Each configurable parameter is modified by entering the command:
  239.  
  240. E <location> <hex value>
  241.  
  242. where <location> identifies the parameter, and <hex value> is the replacement 
  243. value. Terminate the command with the Enter key. Once all changes have been 
  244. made save the new configuration with the command:
  245.  
  246. W
  247.  
  248. again terminated with the Enter key, and type Q <enter> to terminate.
  249.  
  250. QUOTE CHARACTER
  251. ===============
  252.  
  253. The <location> of the quote character is 0106. To change the quote character, 
  254. use this <location> and, as the <hex value>, give the replacement character 
  255. enclosed in single quotes. e.g.
  256.  
  257. E0106 ':'
  258.  
  259. changes the quote character to a colon. Note that leading zeroes may be 
  260. omitted, and there is no need for a space after the initial E.
  261.  
  262. COLOURS
  263. =======
  264.  
  265. There are three attribute bytes that may be configured by the user at locations 
  266. 0103, 0104 and 0105, which respectively provide the colours for normal text, 
  267. inverse and text found by the Search function. In the supplied software, these 
  268. attribute bytes are set to the monochrome values. They are tested at start up 
  269. and if a colour monitor is available, the monochrome values are changed to the 
  270. current screen attribute byte, its inverse, and flashing inverse respectively.
  271.  
  272. If they are not the assumed monchrome values, then the values found in these 
  273. fields are used as the screen attribute bytes. The Hex values for each 
  274. attribute byte are calculated as follows:
  275.  
  276. 0   0   0   1   |   1   1   1   1 e.g. 0x1f ---> Bright white on blue
  277. ---------------------------------                                    
  278. B   R   G   B   |   I   R   G   B                                    
  279. L   E   R   L   |   N   E   R   L                                    
  280. I   D   E   U   |   T   D   E   U                                    
  281. N       E   E   |   E       E   E                                    
  282. K       N       |   N       N                                        
  283.             S
  284.             I
  285.             T
  286.             Y
  287.  
  288. For example, the commands:
  289.  
  290. E103 1F
  291. E104 71
  292. E105 F1
  293.  
  294. gives    normal text     - bright white on blue
  295.     Inverse text     - blue on grey
  296.     Search text     - flashing blue on grey.
  297.  
  298. WORD WRAP
  299. =========
  300.  
  301. The word wrap flag is at location 0107. An hex value of 00 is off and FF is on.
  302.  
  303. WORD WRAP COLUMN
  304. ================
  305.  
  306. By default, word wrap occurs when the cursor moves out of the rightmost column 
  307. of the screen. This can be set to any column. Both absolute and relative 
  308. positioning of the word wrap column are possible.
  309.  
  310. The absolute word wrap column is set using location 010A. When this byte is 
  311. zero then the rightmost column of the screen is the word wrap column. If this 
  312. byte is non-zero then its value (unsigned integer) determines word wrap column.
  313.  
  314. For example, to set word wrap to column 75 (4BH) using DEBUG, enter:
  315.  
  316. E010A 4B
  317.  
  318. The relative word wrap column is set using location 0108. When location 010A is 
  319. zero, the value of this byte (signed integer) is subtracted from the screen 
  320. width to determine the word wrap column.
  321.  
  322. For example, to set word wrap to column 75 using DEBUG, enter:
  323.  
  324. E0108 05
  325.  
  326. PROGRAM INFORMATION
  327. ===================
  328.  
  329. SuperTED is written entirely in 8086 assembler and uses no protected mode 
  330. instructions. It is capable of detecting monochrome and colour displays, screen 
  331. width, and a BIOS that supports an extended keyboard. It should also handle 
  332. these different types of devices appropriately. This version of SuperTED was 
  333. compiled using Arrowsmith's public domain assembler (available on SIMTEL20 and 
  334. all good mirror sites), and linked using the MSDOS linker. 
  335.  
  336. I have provided a copy of the source code for those who want more 
  337. configurability than offered.
  338.  
  339.